package com.hhkj.admin.bank.common.cont;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.HashSet;
import java.util.Set;

/**
 * QuestionOrderRuleConst
 *
 * @author ZhengJun
 * @since 2023/5/22 19:25
 */
public class QuestionOrderRuleConst {

    /** 排序规则 顺序打乱 disruption 手动排序 manualSortType */
    @Getter
    @AllArgsConstructor
    public enum Type
    {
        DISRUPTION("disruption", "顺序打乱"),
        MANUAL_SORT_TYPE("manualSortType", "手动排序"),
        ;
        /** 编码 */
        private final String code;
        /** 名称 */
        private final String name;

        public static Set<String> getCodeSet() {
            Set<String> codeSet = new HashSet<>();
            for (Type type : values()) {
                codeSet.add(type.code);
            }
            return codeSet;
        }

        @Override
        public String toString()
        {
            return this.code;
        }
    }
}
